const mongoose = require('mongoose');
// 使用mongoose创建Schema表----设置表字段---->约束列数据类型
let Schema = new mongoose.Schema({
  uid: String,
  gid: String,
  cartnum: {
    type: Number,
    default: 1
  },
  is_select: {
    type: Boolean,
    default: true
  }
})
//创建模型 并导出
module.exports = mongoose.model('cart', Schema, 'cart');